package fileby.gui.tabs;

import com.google.inject.Inject;
import fileby.ctrl.tabs.ITabItemListenerProvider;
import fileby.core.IDisplayableFile;
import fileby.ctrl.actions.IActionProvider;
import fileby.ctrl.transferhandlers.ITransferHandlerProvider;
import fileby.util.properties.IPropertyBundleProvider;

/**
 *
 * @author Ludwig Kjellstrom
 */
public class TabItemFactory {

    ITabItemListenerProvider listenerProvider;
    IActionProvider actionProvider;
    IPropertyBundleProvider bundleProvider;
    ITransferHandlerProvider transferHandlerProvider;

    @Inject
    public TabItemFactory(
            ITabItemListenerProvider listenerProvider,
            IActionProvider actionProvider,
            IPropertyBundleProvider bundleProvider,
            ITransferHandlerProvider transferHandlerProvider) {

        this.listenerProvider = listenerProvider;
        this.actionProvider = actionProvider;
        this.bundleProvider = bundleProvider;
        this.transferHandlerProvider = transferHandlerProvider;
    }

    TabItem create(IDisplayableFile f) {
        return new  TabItem(f, listenerProvider, actionProvider, bundleProvider,
                transferHandlerProvider);
    }
}
